<template>
<uni-shadow-root class="partials-tab-lovePage-index"><template name="lovePage">
    <view class="wrap" v-if="arr.length!=0">
        <scroll-view scroll-x :class="firstDistance&&(firstDistance<=scroll-4)?'tab-h fixed':'tab-h'" id="tab-h" scroll-with-animation="true">
            <view v-for="(type,index) in (data.jsonData.tabs)" :key="type.index" :data-index="index" :data-item="type" @click="swichNav" :id="'tab_'+type.id" class="tab-item" :style="'font-size:'+(currentTab==index?"32rpx":"28rpx")+';color:'+(data.jsonData.fontColor)">
             <text class="tab-item_text">{{type.title}}</text>
             <view class="active_bar" :style="'background:linear-gradient(90deg,'+(data.jsonData.bgColor||"#fff")+' 0%,'+(data.jsonData.fontHoverColor||"#fff")+' 100%);'" v-if="currentTab==index"></view>
            </view>
        </scroll-view>
    </view>
</template></uni-shadow-root>
</template>

<script>

global['__wxRoute'] = 'partials/tab/lovePage/index'

Component({})

export default global['__wxComponents']['partials/tab/lovePage/index']
</script>
<style platform="mp-weixin">
.active_bar{
    height: 12rpx;
    position: absolute;
    bottom: 8rpx;
    left: -3%;
    width: 106%;
    z-index: 2;
    transform:skewX(-30deg);
}
.tab-item_text{
    position: relative;
    z-index: 3;
}
</style>